﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WebServiceRequester
{
    public partial class WebFormServiceRequester : System.Web.UI.Page
    {
        private InfoReg.GetInfoRegionService ws;
        private wsMeteo.WeatherProviderService ws2;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            ws = new InfoReg.GetInfoRegionService();
            ws2 = new wsMeteo.WeatherProviderService();
        }

        protected void Button2_Click1(object sender, EventArgs e)
        {
            String[] tabRecup = ws.getInfoR(this.TextBox1.Text);
            String retour="";
            foreach(String val in tabRecup)
            {
                retour+= val + " ";
            }
            this.Label2.Text = retour;
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            //this.Label5.Text = System.Convert.ToString(ws2.getTemperature(this.TextBox2));
            this.Label5.Text = ws2.getWeather(this.TextBox2.Text) ;
        }


    }
}
